<!DOCTYPE html>
<html>
<head>
<title>Template</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="../ext/resources/css/ext-all.css"/>
<link rel="stylesheet" type="text/css" href="../ext/resources/css/ext-icon.css"/>
<link rel="stylesheet" type="text/css" href="../ext/resources/css/ext-revise.css"/>
<script type="text/javascript" src="../ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../ext/ext-all.js"></script>
<script type="text/javascript" src="../ext/ext-revise.js"></script>
<script type="text/javascript" src="../ext/src/locale/ext-lang-zh_CN.js"></script>
<script type="text/javascript" src="../ext/adapter/ux/ComboBoxTree.js"></script>
</head>

<body>
<script type="text/javascript">
Ext.QuickTips.init();

var form = new Ext.form.FormPanel({
	renderTo: Ext.getBody(),
	frame: true,
    labelWidth: 150,
    items: [{
    	xtype: "combotree",
    	hiddenName: "combotree",
    	fieldLabel: "Remote ComboTree",
    	value: "0",
    	dataUrl: "/struts2-extjs3/combo/combotree.do",
    	rootVisible: false,
    	folderSelectable: false,
    	//showNodePath: true,
    	//nodePathUrl: "/struts2-extjs3/combo/combotree.do?node=8",
        root: new Ext.tree.AsyncTreeNode({
            id: "0",
            text: "Country",
            expanded: true
        }),
    	allowBlank: false,
        emptyText: "--select--",
        blankText: "please select an option."
    }]
});

var button = new Ext.Button({
    renderTo: Ext.getBody(),
    text: "Get Value",
    handler: function() {
        Ext.Msg.alert("Value Dialog", Ext.encode(form.getForm().getValues()));
    }
});

var tree = new Ext.tree.TreePanel({
	renderTo: Ext.getBody(),
	//frame: true,
    animate: true,
    width: 165,
    height: 200,
    autoScroll: true,
    containerScroll: true,
    rootVisible: true,
    loader: new Ext.tree.TreeLoader({
        dataUrl: "/struts2-extjs3/combo/combotree.do"
    }),
    root: new Ext.tree.AsyncTreeNode({
        id: "0",
        text: "Country"
    })
});
</script>
</body>
</html>
